export default{
    list:[],
    subscribe:function(item){
        this.list.push(item)
    },
    publish:function(val){
        this.list.forEach(item=>{
            item&&item(val)
        })
    }
}